<form class="layui-form  seller-alone-form" id="userAdd" style="padding:20px;">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label"><i class="required-color">*</i>手机号：</label>
            <div class="layui-input-inline">
                <input type="text" name="mobile" required lay-verify="required|phone"  class="layui-input" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">用户名：</label>
            <div class="layui-input-inline">
                <input type="text" name="username" class="layui-input" autocomplete="off">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label"><i class="required-color">*</i>密码：</label>
            <div class="layui-input-inline">
                <input type="text" name="password" class="layui-input" autocomplete="off"  onfocus="this.type='password'"  >
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"><i class="required-color">*</i>确认密码：</label>
            <div class="layui-input-inline">
                <input type="text" name="repassword" class="layui-input" autocomplete="off" onfocus="this.type='password'">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">性别：</label>
            <div class="layui-input-inline">
                <input type="radio" name="sex" value="1" title="男" checked="checked">
                <input type="radio" name="sex" value="2" title="女">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">生日：</label>
            <div class="layui-input-inline">
                <input type="text" name="birthday" id="birthday" class="layui-input" autocomplete="off">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">等级：</label>
            <div class="layui-input-inline">
                <select name="grade" >
                    <option value="" selected="selected">请选择</option>
                    {foreach $grade as $k=>$v}
                    <option value="{$v.id}">{$v.name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">状态：</label>
            <div class="layui-input-inline">
                <select name="status" id="status">
                    <option value="1" selected="selected">可用</option>
                    <option value="2">停用</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">昵称：</label>

            <div class="layui-input-inline">
                <input type="text" name="nickname" class="layui-input" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">邀请人：</label>
            <div class="layui-input-inline">
                {Jshop:selectuser value="0" num="1" name="pid" /}
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">头像：</label>
            <div class="layui-input-inline">
                {Jshop:image id="avatar" name="avatar"}
            </div>
        </div>
        <div class="layui-inline" style="margin-top: -50px">
            <label class="layui-form-label">备注：</label>
            <div class="layui-input-inline">
                <textarea name="remarks" maxlength="100" cols="10" rows="3" placeholder="用户备注" class="layui-textarea" style="resize: none"></textarea>
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">注意:</label>
        <div class="layui-form-mid">用户名不是必填的，但是账号一经创建成功，用户名不允许修改。</div>
    </div>
    {:jshopToken('add_user')}
</form>
<script>
    layui.use(['form', 'laydate'], function () {
        var form = layui.form, laydate = layui.laydate;
        form.render();

        laydate.render({
            elem: '#birthday',
						trigger: 'click' //自动弹出控件的事件，采用click弹出
        });
    });
</script>
